'Test oh aj Sort Tests.txt b+ mod for oh 2021-03-07
' build test strings and numbers and display
' 2021-03-08 this had unexpected error crop up building with b and b and r are variables
' see Test oh aj fixed SortTests.txt
[
	cnt = a[cnt,1]
	jmp gt[cnt,20]
	rLen = a[int[rnd[10]],2]
	b = mt
	cnt2 = 0
	[
		cnt2 = a[cnt2,1]
		jmp gt[cnt2,rLen]
		b = bnd[b,chr[a[int[rnd[26]],65]]]
	]
	set AstringS;cnt;b
	r = int[rnd[x[100,100]]]
	set AstringN;cnt;r
	loc cnt;1
	; b
	loc a[cnt,21];1
	; r
]
' sort into 4 groups 2 string 2 number, ascending and descending
sa = assort[AstringS]
sd = dssort[AstringS]
na = ansort[AstringN]
nd = dnSort[AstringN]
' display sorted groups
cnt = 0
[
	cnt = a[cnt,1]
	jmp gt[cnt,20]
	sai = get[sa,cnt]
	sdi = get[sd,cnt]
	nai = get[na,cnt]
	ndi = get[nd,cnt]
	at 20;cnt
	; sai
	at 40;cnt
	; sdi
	row = a[cnt,21]
	at 20;row
	; nai
	at 40;row
	; ndi
]
Zzz